<h1>Listing patients</h1>

<table>
  <tr>
    <th>Prénom</th>
	<th>Nom</th>
	<th>Email</th>
	<th>Adresse</th>
	<th>Code postal</th>
	<th>Ville</th>
    <th>Poids</th>
    <th>Taille</th>
    <th>Antécédents notables</th>
  </tr>
<% @patients.each do |patient| %>
  <tr>
    <td><%=h patient.user.firstname %></td>
	<td><%=h patient.user.lastname %></td>
	<td><%=h patient.user.email %></td>
	<td><%=h patient.user.adress %></td>
	<td><%=h patient.user.cp %></td>
	<td><%=h patient.user.city %></td>
    <td><%=h patient.weight %></td>
    <td><%=h patient.height %></td>
    <td><%=h patient.allergies %></td>
    <td><%= link_to 'Show', patient %></td>
    <td><%= link_to 'Edit', edit_patient_path(patient) %></td>
    <td><%= link_to 'Destroy', patient, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New patient', new_patient_path %>